# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=shared-mime-info
pkgver=2.4
pkgrel=0
pkgdesc="Freedesktop.org Shared MIME Info"
url="https://freedesktop.org/Software/shared-mime-info"
arch="all"
license="GPL-2.0-or-later"
makedepends="meson itstool libxml2-utils xmlto libxml2-dev glib-dev"
install="$pkgname.post-deinstall"
triggers="$pkgname.trigger=/usr/share/mime"
subpackages="$pkgname-doc $pkgname-lang"
source="https://gitlab.freedesktop.org/xdg/shared-mime-info/-/archive/$pkgver/shared-mime-info-$pkgver.tar.gz"

build() {
	abuild-meson \
		-Dupdate-mimedb=false \
		. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
17b443c2c09a432d09e4c83db956f8c0c3a768cfa9ffb8c87cd2d7c9002b95d010094e2bc64dd35946205a0f8b2d87c4f8f0a1faec86443e2edd502aa8f7cc8f  shared-mime-info-2.4.tar.gz
"
